<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>{$meta.name}</title>
</head>
<body>
    <form action="{:url('submitEditAction',['scene_id'=>$meta['id']])}" method="post">
        <foreach name="fields" item="field">
        <if condition="$field['readable']">
            <div>
                <label for="{$field.name}">{$field.title}</label>
                <input type="text" name="{$field.name}" id="{$field.name}" value="{$item[$field['name']]}" <?php if(!$field['writable']) echo 'readonly';?> <?php if($field['required']) echo 'required';?>>
            </div>
        </if>
        </foreach>
        <button type="submit">提交</button>
    </form>
</body>
</html>
